import request from '@/utils/request'

export default {
  //1 生成订单的方法
  createOrder(courseId) {
    return request({
      url: `/eduorder/order/createOrder/${courseId}`,
      method: 'post',
    })
  },
  //2 根据订单id查询订单的方法
  getOrderInfo(orderId) {
    return request({
      url: `/eduorder/order/getOrderInfo/${orderId}`,
      method: 'get',
    })
  },
  //生成二维码的方法
  createNatvie(orderNo) {
    return request({
      url: '/eduorder/pay-log/createNative/'+orderNo,
      method: 'get'
    })
  },
  //查询订单状态的方法
  queryPayStatus(orderNo) {
    return request({
      url: '/eduorder/pay-log/queryPayStatus/'+orderNo,
      method: 'get'
    })
  }
}
